\(\int \csc ^5(a+b x) \sec ^4(a+b x) \, dx\) [183]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 17, antiderivative size = 89 \[ \int \csc ^5(a+b x) \sec ^4(a+b x) \, dx=-\frac {35 \text {arctanh}(\cos (a+b x))}{8 b}+\frac {35 \sec (a+b x)}{8 b}+\frac {35 \sec ^3(a+b x)}{24 b}-\frac {7 \csc ^2(a+b x) \sec ^3(a+b x)}{8 b}-\frac {\csc ^4(a+b x) \sec ^3(a+b x)}{4 b} \]

[Out]

-35/8*arctanh(cos(b*x+a))/b+35/8*sec(b*x+a)/b+35/24*sec(b*x+a)^3/b-7/8*csc(b*x+a)^2*sec(b*x+a)^3/b-1/4*csc(b*x
+a)^4*sec(b*x+a)^3/b

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.235, Rules used = {2702, 294, 308, 213} \[ \int \csc ^5(a+b x) \sec ^4(a+b x) \, dx=-\frac {35 \text {arctanh}(\cos (a+b x))}{8 b}+\frac {35 \sec ^3(a+b x)}{24 b}+\frac {35 \sec (a+b x)}{8 b}-\frac {\csc ^4(a+b x) \sec ^3(a+b x)}{4 b}-\frac {7 \csc ^2(a+b x) \sec ^3(a+b x)}{8 b} \]

[In]

Int[Csc[a + b*x]^5*Sec[a + b*x]^4,x]

[Out]

(-35*ArcTanh[Cos[a + b*x]])/(8*b) + (35*Sec[a + b*x])/(8*b) + (35*Sec[a + b*x]^3)/(24*b) - (7*Csc[a + b*x]^2*S
ec[a + b*x]^3)/(8*b) - (Csc[a + b*x]^4*Sec[a + b*x]^3)/(4*b)

Rule 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 294

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^
n)^(p + 1)/(b*n*(p + 1))), x] - Dist[c^n*((m - n + 1)/(b*n*(p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^(p + 1), x
], x] /; FreeQ[{a, b, c}, x] && IGtQ[n, 0] && LtQ[p, -1] && GtQ[m + 1, n] &&  !ILtQ[(m + n*(p + 1) + 1)/n, 0]
&& IntBinomialQ[a, b, c, n, m, p, x]

Rule 308

Int[(x_)^(m_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Int[PolynomialDivide[x^m, a + b*x^n, x], x] /; FreeQ[{a,
b}, x] && IGtQ[m, 0] && IGtQ[n, 0] && GtQ[m, 2*n - 1]

Rule 2702

Int[csc[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Dist[1/(f*a^n), Subst[Int
[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/2), x], x, a*Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n
 + 1)/2] &&  !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {x^8}{\left (-1+x^2\right )^3} \, dx,x,\sec (a+b x)\right )}{b} \\ & = -\frac {\csc ^4(a+b x) \sec ^3(a+b x)}{4 b}+\frac {7 \text {Subst}\left (\int \frac {x^6}{\left (-1+x^2\right )^2} \, dx,x,\sec (a+b x)\right )}{4 b} \\ & = -\frac {7 \csc ^2(a+b x) \sec ^3(a+b x)}{8 b}-\frac {\csc ^4(a+b x) \sec ^3(a+b x)}{4 b}+\frac {35 \text {Subst}\left (\int \frac {x^4}{-1+x^2} \, dx,x,\sec (a+b x)\right )}{8 b} \\ & = -\frac {7 \csc ^2(a+b x) \sec ^3(a+b x)}{8 b}-\frac {\csc ^4(a+b x) \sec ^3(a+b x)}{4 b}+\frac {35 \text {Subst}\left (\int \left (1+x^2+\frac {1}{-1+x^2}\right ) \, dx,x,\sec (a+b x)\right )}{8 b} \\ & = \frac {35 \sec (a+b x)}{8 b}+\frac {35 \sec ^3(a+b x)}{24 b}-\frac {7 \csc ^2(a+b x) \sec ^3(a+b x)}{8 b}-\frac {\csc ^4(a+b x) \sec ^3(a+b x)}{4 b}+\frac {35 \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sec (a+b x)\right )}{8 b} \\ & = -\frac {35 \text {arctanh}(\cos (a+b x))}{8 b}+\frac {35 \sec (a+b x)}{8 b}+\frac {35 \sec ^3(a+b x)}{24 b}-\frac {7 \csc ^2(a+b x) \sec ^3(a+b x)}{8 b}-\frac {\csc ^4(a+b x) \sec ^3(a+b x)}{4 b} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(268\) vs. \(2(89)=178\).

Time = 0.45 (sec) , antiderivative size = 268, normalized size of antiderivative = 3.01 \[ \int \csc ^5(a+b x) \sec ^4(a+b x) \, dx=-\frac {\csc ^{10}(a+b x) \left (-204+658 \cos (2 (a+b x))-228 \cos (3 (a+b x))+140 \cos (4 (a+b x))-76 \cos (5 (a+b x))-210 \cos (6 (a+b x))+76 \cos (7 (a+b x))-315 \cos (3 (a+b x)) \log \left (\cos \left (\frac {1}{2} (a+b x)\right )\right )-105 \cos (5 (a+b x)) \log \left (\cos \left (\frac {1}{2} (a+b x)\right )\right )+105 \cos (7 (a+b x)) \log \left (\cos \left (\frac {1}{2} (a+b x)\right )\right )+3 \cos (a+b x) \left (76+105 \log \left (\cos \left (\frac {1}{2} (a+b x)\right )\right )-105 \log \left (\sin \left (\frac {1}{2} (a+b x)\right )\right )\right )+315 \cos (3 (a+b x)) \log \left (\sin \left (\frac {1}{2} (a+b x)\right )\right )+105 \cos (5 (a+b x)) \log \left (\sin \left (\frac {1}{2} (a+b x)\right )\right )-105 \cos (7 (a+b x)) \log \left (\sin \left (\frac {1}{2} (a+b x)\right )\right )\right )}{24 b \left (\csc ^2\left (\frac {1}{2} (a+b x)\right )-\sec ^2\left (\frac {1}{2} (a+b x)\right )\right )^3} \]

[In]

Integrate[Csc[a + b*x]^5*Sec[a + b*x]^4,x]

[Out]

-1/24*(Csc[a + b*x]^10*(-204 + 658*Cos[2*(a + b*x)] - 228*Cos[3*(a + b*x)] + 140*Cos[4*(a + b*x)] - 76*Cos[5*(
a + b*x)] - 210*Cos[6*(a + b*x)] + 76*Cos[7*(a + b*x)] - 315*Cos[3*(a + b*x)]*Log[Cos[(a + b*x)/2]] - 105*Cos[
5*(a + b*x)]*Log[Cos[(a + b*x)/2]] + 105*Cos[7*(a + b*x)]*Log[Cos[(a + b*x)/2]] + 3*Cos[a + b*x]*(76 + 105*Log
[Cos[(a + b*x)/2]] - 105*Log[Sin[(a + b*x)/2]]) + 315*Cos[3*(a + b*x)]*Log[Sin[(a + b*x)/2]] + 105*Cos[5*(a +
b*x)]*Log[Sin[(a + b*x)/2]] - 105*Cos[7*(a + b*x)]*Log[Sin[(a + b*x)/2]]))/(b*(Csc[(a + b*x)/2]^2 - Sec[(a + b
*x)/2]^2)^3)

Maple [A] (verified)

Time = 0.33 (sec) , antiderivative size = 88, normalized size of antiderivative = 0.99

method result size
derivativedivides \(\frac {-\frac {1}{4 \cos \left (b x +a \right )^{3} \sin \left (b x +a \right )^{4}}+\frac {7}{12 \cos \left (b x +a \right )^{3} \sin \left (b x +a \right )^{2}}-\frac {35}{24 \cos \left (b x +a \right ) \sin \left (b x +a \right )^{2}}+\frac {35}{8 \cos \left (b x +a \right )}+\frac {35 \ln \left (\csc \left (b x +a \right )-\cot \left (b x +a \right )\right )}{8}}{b}\) \(88\)
default \(\frac {-\frac {1}{4 \cos \left (b x +a \right )^{3} \sin \left (b x +a \right )^{4}}+\frac {7}{12 \cos \left (b x +a \right )^{3} \sin \left (b x +a \right )^{2}}-\frac {35}{24 \cos \left (b x +a \right ) \sin \left (b x +a \right )^{2}}+\frac {35}{8 \cos \left (b x +a \right )}+\frac {35 \ln \left (\csc \left (b x +a \right )-\cot \left (b x +a \right )\right )}{8}}{b}\) \(88\)
risch \(\frac {105 \,{\mathrm e}^{13 i \left (b x +a \right )}-70 \,{\mathrm e}^{11 i \left (b x +a \right )}-329 \,{\mathrm e}^{9 i \left (b x +a \right )}+204 \,{\mathrm e}^{7 i \left (b x +a \right )}-329 \,{\mathrm e}^{5 i \left (b x +a \right )}-70 \,{\mathrm e}^{3 i \left (b x +a \right )}+105 \,{\mathrm e}^{i \left (b x +a \right )}}{12 b \left ({\mathrm e}^{2 i \left (b x +a \right )}-1\right )^{4} \left ({\mathrm e}^{2 i \left (b x +a \right )}+1\right )^{3}}-\frac {35 \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right )}{8 b}+\frac {35 \ln \left ({\mathrm e}^{i \left (b x +a \right )}-1\right )}{8 b}\) \(145\)
norman \(\frac {\frac {1}{64 b}+\frac {21 \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{64 b}+\frac {21 \left (\tan ^{12}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{64 b}+\frac {\tan ^{14}\left (\frac {b x}{2}+\frac {a}{2}\right )}{64 b}-\frac {21 \left (\tan ^{8}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{2 b}+\frac {511 \left (\tan ^{6}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{32 b}-\frac {847 \left (\tan ^{4}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{96 b}}{\left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )-1\right )^{3} \tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{4}}+\frac {35 \ln \left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{8 b}\) \(146\)
parallelrisch \(\frac {840 \left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )-1\right )^{3} \left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )+1\right )^{3} \ln \left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )\right )+3 \left (\tan ^{10}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )+63 \left (\tan ^{8}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )+3 \left (\cot ^{4}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )-2016 \left (\tan ^{4}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )+63 \left (\cot ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )+3066 \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )-1694}{192 b \left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )-1\right )^{3} \left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )+1\right )^{3}}\) \(150\)

[In]

int(sec(b*x+a)^4/sin(b*x+a)^5,x,method=_RETURNVERBOSE)

[Out]

1/b*(-1/4/cos(b*x+a)^3/sin(b*x+a)^4+7/12/cos(b*x+a)^3/sin(b*x+a)^2-35/24/cos(b*x+a)/sin(b*x+a)^2+35/8/cos(b*x+
a)+35/8*ln(csc(b*x+a)-cot(b*x+a)))

Fricas [A] (verification not implemented)

none

Time = 0.35 (sec) , antiderivative size = 148, normalized size of antiderivative = 1.66 \[ \int \csc ^5(a+b x) \sec ^4(a+b x) \, dx=\frac {210 \, \cos \left (b x + a\right )^{6} - 350 \, \cos \left (b x + a\right )^{4} + 112 \, \cos \left (b x + a\right )^{2} - 105 \, {\left (\cos \left (b x + a\right )^{7} - 2 \, \cos \left (b x + a\right )^{5} + \cos \left (b x + a\right )^{3}\right )} \log \left (\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2}\right ) + 105 \, {\left (\cos \left (b x + a\right )^{7} - 2 \, \cos \left (b x + a\right )^{5} + \cos \left (b x + a\right )^{3}\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2}\right ) + 16}{48 \, {\left (b \cos \left (b x + a\right )^{7} - 2 \, b \cos \left (b x + a\right )^{5} + b \cos \left (b x + a\right )^{3}\right )}} \]

[In]

integrate(sec(b*x+a)^4/sin(b*x+a)^5,x, algorithm="fricas")

[Out]

1/48*(210*cos(b*x + a)^6 - 350*cos(b*x + a)^4 + 112*cos(b*x + a)^2 - 105*(cos(b*x + a)^7 - 2*cos(b*x + a)^5 +
cos(b*x + a)^3)*log(1/2*cos(b*x + a) + 1/2) + 105*(cos(b*x + a)^7 - 2*cos(b*x + a)^5 + cos(b*x + a)^3)*log(-1/
2*cos(b*x + a) + 1/2) + 16)/(b*cos(b*x + a)^7 - 2*b*cos(b*x + a)^5 + b*cos(b*x + a)^3)

Sympy [F]

\[ \int \csc ^5(a+b x) \sec ^4(a+b x) \, dx=\int \frac {\sec ^{4}{\left (a + b x \right )}}{\sin ^{5}{\left (a + b x \right )}}\, dx \]

[In]

integrate(sec(b*x+a)**4/sin(b*x+a)**5,x)

[Out]

Integral(sec(a + b*x)**4/sin(a + b*x)**5, x)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.02 \[ \int \csc ^5(a+b x) \sec ^4(a+b x) \, dx=\frac {\frac {2 \, {\left (105 \, \cos \left (b x + a\right )^{6} - 175 \, \cos \left (b x + a\right )^{4} + 56 \, \cos \left (b x + a\right )^{2} + 8\right )}}{\cos \left (b x + a\right )^{7} - 2 \, \cos \left (b x + a\right )^{5} + \cos \left (b x + a\right )^{3}} - 105 \, \log \left (\cos \left (b x + a\right ) + 1\right ) + 105 \, \log \left (\cos \left (b x + a\right ) - 1\right )}{48 \, b} \]

[In]

integrate(sec(b*x+a)^4/sin(b*x+a)^5,x, algorithm="maxima")

[Out]

1/48*(2*(105*cos(b*x + a)^6 - 175*cos(b*x + a)^4 + 56*cos(b*x + a)^2 + 8)/(cos(b*x + a)^7 - 2*cos(b*x + a)^5 +
 cos(b*x + a)^3) - 105*log(cos(b*x + a) + 1) + 105*log(cos(b*x + a) - 1))/b

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 209 vs. \(2 (79) = 158\).

Time = 0.32 (sec) , antiderivative size = 209, normalized size of antiderivative = 2.35 \[ \int \csc ^5(a+b x) \sec ^4(a+b x) \, dx=\frac {\frac {3 \, {\left (\frac {24 \, {\left (\cos \left (b x + a\right ) - 1\right )}}{\cos \left (b x + a\right ) + 1} - \frac {210 \, {\left (\cos \left (b x + a\right ) - 1\right )}^{2}}{{\left (\cos \left (b x + a\right ) + 1\right )}^{2}} - 1\right )} {\left (\cos \left (b x + a\right ) + 1\right )}^{2}}{{\left (\cos \left (b x + a\right ) - 1\right )}^{2}} - \frac {72 \, {\left (\cos \left (b x + a\right ) - 1\right )}}{\cos \left (b x + a\right ) + 1} + \frac {3 \, {\left (\cos \left (b x + a\right ) - 1\right )}^{2}}{{\left (\cos \left (b x + a\right ) + 1\right )}^{2}} + \frac {256 \, {\left (\frac {9 \, {\left (\cos \left (b x + a\right ) - 1\right )}}{\cos \left (b x + a\right ) + 1} + \frac {6 \, {\left (\cos \left (b x + a\right ) - 1\right )}^{2}}{{\left (\cos \left (b x + a\right ) + 1\right )}^{2}} + 5\right )}}{{\left (\frac {\cos \left (b x + a\right ) - 1}{\cos \left (b x + a\right ) + 1} + 1\right )}^{3}} + 420 \, \log \left (\frac {{\left | -\cos \left (b x + a\right ) + 1 \right |}}{{\left | \cos \left (b x + a\right ) + 1 \right |}}\right )}{192 \, b} \]

[In]

integrate(sec(b*x+a)^4/sin(b*x+a)^5,x, algorithm="giac")

[Out]

1/192*(3*(24*(cos(b*x + a) - 1)/(cos(b*x + a) + 1) - 210*(cos(b*x + a) - 1)^2/(cos(b*x + a) + 1)^2 - 1)*(cos(b
*x + a) + 1)^2/(cos(b*x + a) - 1)^2 - 72*(cos(b*x + a) - 1)/(cos(b*x + a) + 1) + 3*(cos(b*x + a) - 1)^2/(cos(b
*x + a) + 1)^2 + 256*(9*(cos(b*x + a) - 1)/(cos(b*x + a) + 1) + 6*(cos(b*x + a) - 1)^2/(cos(b*x + a) + 1)^2 +
5)/((cos(b*x + a) - 1)/(cos(b*x + a) + 1) + 1)^3 + 420*log(abs(-cos(b*x + a) + 1)/abs(cos(b*x + a) + 1)))/b

Mupad [B] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.88 \[ \int \csc ^5(a+b x) \sec ^4(a+b x) \, dx=\frac {\frac {35\,{\cos \left (a+b\,x\right )}^6}{8}-\frac {175\,{\cos \left (a+b\,x\right )}^4}{24}+\frac {7\,{\cos \left (a+b\,x\right )}^2}{3}+\frac {1}{3}}{b\,\left ({\cos \left (a+b\,x\right )}^7-2\,{\cos \left (a+b\,x\right )}^5+{\cos \left (a+b\,x\right )}^3\right )}-\frac {35\,\mathrm {atanh}\left (\cos \left (a+b\,x\right )\right )}{8\,b} \]

[In]

int(1/(cos(a + b*x)^4*sin(a + b*x)^5),x)

[Out]

((7*cos(a + b*x)^2)/3 - (175*cos(a + b*x)^4)/24 + (35*cos(a + b*x)^6)/8 + 1/3)/(b*(cos(a + b*x)^3 - 2*cos(a +
b*x)^5 + cos(a + b*x)^7)) - (35*atanh(cos(a + b*x)))/(8*b)